// Spec.cpp: implementation of the Spec class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Spec.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
namespace PDMS
{
	namespace SpecFrame
	{	
		UE_PDMSCLASS_IMPLEMENT( Spec, UeDbObject, _T("SPEC") );

		Spec::Spec()
		{
			m_strMatref = "";
			m_lMatID = 0;
			m_strFluidref = "";
			m_lFluID = 0;
			m_dRating = 0.0;
			m_strLineType = "";
			m_strQuestion = "";
			m_dQualifer = 0.0;
			m_dDefault = 0.0;
			m_strBSpecref = "";
			m_lBSpecID = 0;		
			m_strPurpose = "";	
			m_strBltmethod = "";
			m_strCStandard = "";
			m_strTdefault = "";
			m_strTQuestion = "";
			m_strTqualifier = "";
		}
		
		Spec::Spec(Spec& obj) : UeDbObject(obj)
		{
			m_strMatref = obj.m_strMatref;
			m_lMatID = obj.m_lMatID;
			m_strFluidref = obj.m_strFluidref;
			m_lFluID = obj.m_lFluID;
			m_dRating = obj.m_dRating;
			m_strLineType = obj.m_strLineType;
			m_strQuestion = obj.m_strQuestion;
			m_dQualifer = obj.m_dQualifer;
			m_dDefault = obj.m_dDefault;
			m_strBSpecref = obj.m_strBSpecref;
			m_lBSpecID = obj.m_lBSpecID;		
			m_strPurpose = obj.m_strPurpose;	
			m_strBltmethod = obj.m_strBltmethod;
			m_strCStandard = obj.m_strCStandard;
			m_strTdefault = obj.m_strTdefault;
			m_strTQuestion = obj.m_strTQuestion;
			m_strTqualifier = obj.m_strTqualifier;
		}

		Spec::~Spec()
		{

		}

		Persistable* Spec::Clone()
		{
			return new Spec(*this);
		}

		BOOL Spec::IsLegalParent( PDMSFrame::UeDbObject* pParent )
		{
			ASSERT(pParent);
			if ( pParent->ClassID()==_T("SPWL") )
				return true;
			else
				return false;
		}
	}
}



